#pragma once

#include "Wrapper/CGITask.h"
#include "mars/boost/weak_ptr.hpp"
#include "fun.h"
#include "MakeHeader.h"


class NewSendCGITask;


class NewSendCGITask : public CGITask, public BaseHeader
{
public:
	virtual bool Req2Buf(uint32_t _taskid, void* const _user_context, AutoBuffer& _outbuffer, AutoBuffer& _extend, int& _error_code, const int _channel_select);
	virtual int Buf2Resp(uint32_t _taskid, void* const _user_context, const AutoBuffer& _inbuffer, const AutoBuffer& _extend, int& _error_code, const int _channel_select);

	string		m_content;
	string		m_ToId;

private:
	string MakeMsgReq();


	int m_nLenRespCompressed = 0;
	int m_nLenRespProtobuf = 0;
	CGI_TYPE m_nCgiType = CGI_TYPE_NEWSENDMSG;

};